import sys

def getResult(instr):
    maxlen=0
    reslist=[0,0]
    i,j=0,0

    while j<len(instr):
        curchar=instr[j]
        if curchar >='a' and curchar <='z':
            curlen=j-i
            if curlen>maxlen:
                maxlen=curlen
                reslist=[i,j]
            j +=1
        else:
            j+=1
            i=j
        # print("curlen: ",curlen)

    return reslist



for line in sys.stdin:
    a = line.strip()
    start,end=getResult(a)
    print(a[start:end+1])